<?php namespace app\admin\validate;
use think\Validate;
//文章验证
class Article extends Validate{
	protected $rule =   [
        'title'        => 'require|max:100',
        'cid'          => 'require',
//      'tid'          => 'require',
        'sort'         => 'require|number|between:1,100',
        'keywords'     => 'require',  
        'description'  => 'require',
        'author'       => 'require',
        'thumb'        => 'require',
        'content'      => 'require',  
//      'is_show'      => 'require',  
    ];
    
    protected $message  =   [
        'title.require'       => '请输入文章标题！',
        'title.max'           => '文章标题最多100个字符！',
//      'cid.require'         => '请选择所属栏目名称！',
        'tid.require'         => '请选择标签名称！',
        'sort.require'        => '请输入文章排序',
        'sort.number'         => '文章排序只能是数字',
        'sort.between'        => '文章排序只能在1-100之间',
        'keywords.require'    => '请输入文章的关键字！',
        'description.require' => '请输入文章的描述！',
        'author.require'      => '请输入文章的作者！',
        'thumb.require'       => '请上传文章的缩略图！',  
        'content.require'     => '请输入文章的内容！',
//      'is_show.require'     => '请选择是否导航显示！',  
    ];
	
}

